$(function () {

    //掷骰子
    var prev = $('#prev').val() - 1;
    var playnum = $('#cha').val(); //初始次数，由后台传入
    $('.times').html(playnum);
    var isture = 0;
    if (isture) return; // 如果在执行就退出
    isture = true; // 标志为 在执行

    /*定义函数，小人的位置和当前方向*/
    function locadir() {
        //$(".rhombus0").append("<div class='trigalle-lmask'></div><div class='trigalle-rmask'></div><div id='mask-img'></div>");
        //向下的路线
        if((i>5 && i<9) ||(i>9 && i< 12) ||(i>15 && i<18)||(i>18 && i<22) ||(i>25 && i<29)||(i>29 && i<32)||(i>35 && i<41)||(i>41 && i<47)){
//
            $(".rhombus" + i).find("#mask-img").css({"left":"16px","background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role1.png)"});
        }
        if((i>-1 && i<6)||(i>8 && i<10)||(i>11 && i< 16)||(i>17 && i<19)||(i>21 && i<26)||(i>28 && i<30)||(i>31 && i<37)||(i>40 && i<42)){
            $(".rhombus" + i).find("#mask-img").css({"background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role.png)"});
        }
        //向上的路线
        if((i>46 && i<52) ||(i>53 && i< 55) ||(i>57 && i<62)||(i>64 && i<66) ||(i>67 && i<72)||(i>73 && i<75)||(i>77 && i<81)||(i>83 && i<87)){
            $(".rhombus" + i).find("#mask-img").css({"left":"7px","background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role2.png)"});
//
        }
        if((i>51 && i<54)||(i>54 && i< 58)||(i>61 && i<65)||(i>65 && i<68)||(i>71 && i<74)||(i>74 && i<78)||(i>80 && i<84)||(i>86 && i<92)){
            $(".rhombus" + i).find("#mask-img").css({"left":"7px","top":"-43px","background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role2.png)","-webkit-transform":"rotateY(-180deg))","transform":"rotateY(-180deg)"});

        }
        /*点击开始按钮返回到上次退出的位置*/
        var leftx = parseInt($(".rhombus" + prev).offset().left) - parseInt(window.screen.width);
        var topy = parseInt($(".rhombus" + prev).offset().top) - parseInt(window.screen.height);
        console.log(leftx + "llllllllllllllllll");
        console.log(topy + "ttttttttttttttttttttttttt");
        if (leftx > 0) {
            $("html,body").animate({"scrollLeft": "320px", "scrollTop": topy + 240 + "px"}, 1000);
            if (topy > 0) {
                $("html,body").animate({"scrollLeft": "320px", "scrollTop": topy + 240 + "px"}, 1000);
            }
        }
        if (leftx < 0) {
            $("html,body").animate({"scrollLeft": "100px", "scrollTop": topy + 240 + "px"}, 1000);
            if (topy > 0) {
                $("html,body").animate({"scrollLeft": "100px", "scrollTop": topy + 240 + "px"}, 1000);
            }
        }
    }



    //点击播放音乐，再点击暂停播放
    var audio = document.getElementById('music1');
    $(".voice").click(function () {
        if(audio!==null){
            //检测播放是否已暂停.audio.paused 在播放器播放时返回false.
//	     alert(audio.paused);
            if(audio.paused){
                $(".voice img").attr("src","http://s10.realdtech.com/xws/house-richer/richer-home/img/voice-btn.png");
                audio.play();//audio.play();// 这个就是播放
            }else{
                $(".voice img").attr("src","http://s10.realdtech.com/xws/house-richer/richer-home/img/pasuse-audio.png")
                audio.pause();// 这个就是暂停
            }
        }
    });


    /*页面初始化函数，当页面加载的时候直接定位小人的方向*/
    $().ready(function () {
       //audio.play();
        i = prev;
        var shuju = $("#shuju").val();
        if (shuju == 1) {
            $(".group-btn").hide();
            $(".home-bottom").show();
        }
        locadir();
    })

    //点击开始按钮
    $(".start").on("click", function () {
        $(".group-btn").hide();
        $(".home-bottom").show();
        locadir();

    });

    $(".sign-rule").on("click", function () {
        $(".rule-alert").show();
    });
    //点击攻略按钮
    $(".rule").on("click", function () {
        $(".richerRule-alert").show();
    });
    //点击继续游戏
    $(".continue-btn").on("click", function () {
        $(".card-alert").hide();
    });
    //点击弹框关闭按钮
    $(".close-btn").on("click", function () {
        $(".sign-alert").hide();
        $(".rule-alert").hide();
        $(".sign-success").hide();
        $(".richerRule-alert").hide();
    });
    //掷骰子次数为0去掉遮罩
    $('.close-times').on("click", function () {
        $('.times-alert').hide();
    });
    //点击签到规则关闭按钮
    $(".rule-alert .close-btn").on("click", function () {
        $(".rule-alert").hide();
        $(".sign-alert").show();
    });
    //点击全民集卡
    $(".collect-card").on("click", function () {
        $.ajax({
            async: false,
            url: "/wxcs/collectCard",
            type: "post",
            data: {},
            success: function (data) {
                $(".card-word").hide();
                $(".card-rule").hide();
                $(".add-dice1").hide();
                $(".card-alert").show();
                $(".all-card").show();
                console.log(data.lis);
                var tt = data.lis;
                for (i in tt) {
                    console.log(tt[i].prize_id);
                    if (tt[i].prize_id == 1) {
                        //陪彩色
                        $(".words-one img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-pei.jpg");
                    }
                    if (tt[i].prize_id == 2) {
                        $(".words-two img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-ni.jpg");
                    }
                    if (tt[i].prize_id == 3) {
                        $(".words-three img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-shai.jpg");
                    }
                    if (tt[i].prize_id == 4) {
                        $(".words-four img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-zheng.jpg");
                    }
                    if (tt[i].prize_id == 5) {
                        $(".words-five img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-zhou.jpg");
                    }
                }
            },
            error: function () {
                console.log("error，")
            }
        });
    });

    //点击集所有卡片中游戏规则的按钮
    $(".card-rulesbtn").on("click", function () {
        $(".all-card").hide();
        $(".card-rule").show();
    });
    //点击集卡片游戏规则中关闭变扭
    $(".card-rule .rule-close").on("click", function () {
        $(".card-rule").hide();
        $(".all-card").show();
    });

    /*点击兑换奖品的时候*/
    $(".car-changebtn").on("click", function () {
        $.ajax({
            async: false,
            url: "/wxcs/exchange",
            type: "post",
            data: {
                userId: $('#userid').val()
            },
            success(data){
                console.log(data.res);
                if (data.res == 1) {
                    $(".all-card").hide();
                    $(".add-dice1").show();
                    console.log("ceshishaoshdioafhdiohfasdhfjkhasgdjkgfjkasdgjfasdjkfh")
                } else if (data.res = 2) {
                    console.log("退换失败")
                }
            },
            error: function (data) {

            }
        })
    })

    //点击打卡
    $(".signIn").on("click", function () {
        $.ajax({
            async: false,
            url: "/wxcs/findSignIn",
            type: "post",
            data: {
                userId: $('#userid').val()
            },
            success: function (data) {
                if (data.status == 1) {
                    var signNum = data.signNu;
                    console.log(signNum + "-------------------------------------------------------");
                    $(".sign-num").text(signNum);
                    $(".sign-alert").show();
                    $(".click-sign").css({
                        "background": "url(http://s10.realdtech.com/xws/house-richer/richer-home/img/have-sign.png) center no-repeat",
                        "background-size": "100% 100%"
                    });
                } else if (data.status == 0) {
                    var signNum = data.signNu;
                    console.log(signNum + "-------------------------------------------------------");
                    $(".sign-num").text(signNum);
                    $(".sign-alert").show();
                }
            },
            error: function () {
                console.log("error，这是点击打卡按钮失败")
            }
        });
    });
    //关闭所有卡片的关闭按钮
    $(".all-card .rule-close").on("click", function () {
        $(".card-alert").hide();
    });

    //签到次数
    //var signNum=$(signNu).val();
    /*点击签到打卡的时候*/
    $(".click-sign").on("click", function () {
        $(".alert").show();
        $.ajax({
            async: false,
            url: "/wxcs/signin",
            type: "post",
            data: {
                userId: $('#userid').val()
            },
            success: function (data) {
                if (data.result == false) {
                    // alert("error,打卡失败")
                } else {
                    $.ajax({
                        async: false,
                        url: "/wxcs/findSignIn",
                        type: "post",
                        data: {
                            userId: $('#userid').val()
                        },

                        success: function (data) {
                            var signNum = data.signNu;
                            // signNum=signNum+1;
                            $(".sign-num").text(signNum);
                            setTimeout(function () {
                                if (signNum < 7) {
                                    $(".sign-success").show();
                                    $(".sign-success .alert-con").show();
                                    $(".calender-num").text("0" + signNum);
                                    $(".sign-num").text(signNum);
                                    $(".residue-seven").text(7 - signNum);
                                    /*签到7次以后*/
                                } else if (signNum == 7) {
                                    $.ajax({
                                        async: false,
                                        url: "/wxcs/signHello",
                                        data: {
                                            cishu: 7,
                                            userId: $('#userid').val()
                                        },
                                        type: "post",
                                        success: function (data) {
                                            $(".sign-success .alert-con").hide();
                                            $(".sign-success").show();
                                            $(".sign-success .alert .alert-conseven").show();
                                            $(".calender-num").text(signNum);
                                            var nos = data.no;
                                            $(".no").text(nos)
                                        }
                                    });
                                } else if (signNum > 7 && signNum < 15) {
                                    console.log(signNum);
                                    $(".sign-success").show();
                                    $(".sign-success .alert-con").show();
                                    if (signNum < 10) {
                                        $(".calender-num").text("0" + signNum);
                                    } else if (signNum >= 10 && signNum < 15) {
                                        $(".calender-num").text(signNum);
                                    }
                                    $(".sign-level").text(15);
                                    $(".throw-num").text(4);
                                    $(".sign-num").text(signNum);
                                    $(".residue-seven").text(15 - signNum);
                                } else if (signNum == 15) {
                                    $.ajax({
                                        async: false,
                                        url: "/wxcs/signHello",
                                        type: "post",
                                        data: {
                                            cishu: 15,
                                            userId: $('#userid').val()
                                        },
                                        success: function (data) {
                                            $(".alert-con").hide();
                                            $(".sign-success").show();
                                            $(".sign-success .alert .alert-conseven").show();
                                            $(".calender-num").text(signNum);
                                            $(".sign-level").text(15);
                                            $(".throw-num").text(4);
                                            var nos = data.no;
                                            $(".no").text(nos)
                                        }
                                    });
                                } else if (signNum > 15 && signNum < 30) {
                                    $(".sign-success").show();
                                    $(".sign-success .alert-con").hide();
                                    $(".sign-success .alert-conseven").hide();
                                    $(".sign-success .alert-conthirty").show();
                                    $(".calender-num").text(signNum);
                                    $(".sign-num").text(signNum);
                                    $(".residue-seven").text(31 - signNum);
                                } else if (signNum == 30) {
                                    $.ajax({
                                        async: false,
                                        url: "/wxcs/signHello",
                                        type: "post",
                                        data: {
                                            cishu: 30,
                                            userId: $('#userid').val()
                                        },
                                        success: function (data) {
                                            $(".sign-success .alert-conseven").hide();
                                            $(".sign-success .alert-conthirty").hide();
                                            $(".sign-success").show();
                                            $(".sign-success .alert .alert-conallday").show();
                                            $(".calender-num").text(signNum);
                                            var nos = data.no;
                                            $(".nos").text(nos)
                                        }
                                    });
                                }
                                else if (signNum == 31) {
                                    $.ajax({
                                        async: false,
                                        url: "/wxcs/signHello",
                                        type: "post",
                                        data: {
                                            cishu: 31,
                                            userId: $('#userid').val()
                                        },
                                        success: function (data) {
                                            $(".sign-success .alert-conseven").hide();
                                            $(".sign-success .alert-conthirty").hide();
                                            $(".sign-success").show();
                                            $(".sign-success .alert .alert-conallday").show();
                                            $(".calender-num").text(signNum);
                                            var nos = data.no;
                                            $(".nos").text(nos)
                                        }
                                    });
                                }
                            }, 200)
                        },
                    });
                }
            },
            error: function () {
                console.log("error，这是点击签到打卡失败")
            }
        });
    });

    /*step是再次进入游戏的当前步数
     *  aa是进入游戏的时候小人所在的位置
     * */
    var step = $('#prev').val();
    var num = null;
    var aa = $('#prev').val() - 1;
    if (aa == 0) {
        $(".rhombus0").append("<div class='trigalle-lmask'></div><div class='trigalle-rmask'></div><div id='mask-img'></div>");
    } else {
        $(".rhombus" + aa).append("<div class='trigalle-lmask'></div><div class='trigalle-rmask'></div><div id='mask-img'></div>");
    }

    //骰子 ,在jquery中dice代表id为dice可以忽略#
    dice.onclick = function run() {
         //num = Math.floor(Math.random() * 6 + 1);//产生随机数1-6
        num = 1;
        if (playnum <= 0) { //当抽奖次数为0的时候执行
            $(".times-alert").show();
            isture = false;
        } else {
            //还有次数就执行
            /*当掷骰子次数大于0的时候使用的是后台
             * 方法控制次数，掷骰子次数减一
             * */
            $.ajax({
                async: false,
                url: "/wxcs/dice",
                type: "post",
                data: {
                    userId: $('#userid').val(),
                    dicenum: num
                },
                success: function (data) {
                    playnum = playnum - 1; //执行转盘了则次数减1
                    if (playnum <= 0) {
                        playnum = 0;
                    }
                    $('.times').html(playnum);
                    clickfunc();
                },
                error: function (data) {
                    console.log("这是一个错误事件")
                }
            })
        }

        //执行一次  过2000毫秒秒结束 才能点击
        dice.onclick = null;
        clearTimeout(timer);
        var timer = setTimeout(function () {
            dice.onclick = run;
        }, 2000);


        //点击骰子要执行的函数
        function clickfunc() {
            var dice = $("#dice");
            $(".wrap").append("<div id='dice_mask'></div>");//加遮罩
            dice.attr("class", "dice");//清除上次动画后的点数
            dice.css('cursor', 'default');
            dice.animate({left: '+2px'}, 100, function () {
                dice.addClass("dice_t");
            }).delay(200).animate({top: '-2px'}, 100, function () {
                dice.removeClass("dice_t").addClass("dice_s");
            }).delay(200).animate({opacity: 'show'}, 600, function () {
                dice.removeClass("dice_s").addClass("dice_e");
            }).delay(100).animate({left: '-2px', top: '2px'}, 100, function () {
                dice.removeClass("dice_e").addClass("dice_" + num);
                dice.css('cursor', 'pointer');
                $("#dice_mask").remove();//移除遮罩
                console.log("prev的值" + prev);
                roll(prev + 1, prev + num); //逐步运动动画
                /*   if(prev<91){
                 }else {
                 roll(prev-92+1 , prev-92 + num); //逐步运动动画
                 console.log("看看有没有进这个方法")
                 }*/
            });

            var winingInfo = ["陪", "文字寻宝", "大转盘", "找你弟", "听歌", "你", "切瓜", "礼", "晒", "听歌", "楼盘案名", "文字寻宝", "切瓜", "大转盘", "谢谢参与", "礼", "郑", "楼盘案名", "文字寻宝", "大转盘", "州", "找你弟", "楼盘案名", "找你弟", "礼", "听歌", "切瓜"];
            $(".alert button").click(function () {
                $("#alert_mask").hide()
            });

            /*  i就是显示的   step */
            function roll(i, step) {

                var time = setInterval(function () {
                    if (i > 91) {
                        $(".rhombus" + (91)).find("#mask-img").remove();
                        i = 0;
                        console.log(i)
                        $(".rhombus" + i).append("<div class='trigalle-lmask'></div><div class='trigalle-rmask'></div><div id='mask-img'></div>");
                        $(".rhombus" + (i-1)).find(".trigalle-lmask").remove();
                        $(".rhombus" + (i-1)).find(".trigalle-rmask").remove();
                        $(".rhombus" + (i-1)).find("#mask-img").remove();
                        prev=i;
                        clearInterval(time); //如果到达指定位置则停止
                    } else {
                        console.log(i);
                        $(".rhombus" + i).append("<div class='trigalle-lmask'></div><div class='trigalle-rmask'></div><div id='mask-img'></div>");
                        $(".rhombus" + (i - 1)).find(".trigalle-lmask").remove();
                        $(".rhombus" + (i - 1)).find(".trigalle-rmask").remove();
                        $(".rhombus" + (i - 1)).find("#mask-img").remove();

                        prev = i;

                        //向下的路线
                        if((i>5 && i<9) ||(i>9 && i< 12) ||(i>15 && i<18)||(i>18 && i<22) ||(i>25 && i<29)||(i>29 && i<32)||(i>35 && i<41)||(i>41 && i<47)){
//
                            $(".rhombus" + i).find("#mask-img").css({"left":"16px","background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role1.png)"});
                        }
                        if((i>-1 && i<6)||(i>8 && i<10)||(i>11 && i< 16)||(i>17 && i<19)||(i>21 && i<26)||(i>28 && i<30)||(i>31 && i<37)||(i>40 && i<42)){
                            $(".rhombus" + i).find("#mask-img").css({"background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role.png)"});
                        }
                        //向上的路线
                        if((i>46 && i<52) ||(i>53 && i< 55) ||(i>57 && i<62)||(i>64 && i<66) ||(i>67 && i<72)||(i>73 && i<75)||(i>77 && i<81)||(i>83 && i<87)){
                            $(".rhombus" + i).find("#mask-img").css({"left":"7px","background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role2.png)"});
//
                        }
                        if((i>51 && i<54)||(i>54 && i< 58)||(i>61 && i<65)||(i>65 && i<68)||(i>71 && i<74)||(i>74 && i<78)||(i>80 && i<84)||(i>86 && i<92)){
                            $(".rhombus" + i).find("#mask-img").css({"left":"7px","top":"-43px","background-image":"url(http://s10.realdtech.com/xws/house-richer/richer-home/img/role2.png)","-webkit-transform":"rotateY(-180deg))","transform":"rotateY(-180deg)"});

                        }

                    }

                    if (i == step) {
                        // console.log(i);
                        // console.log(window.screen.width);
                        // console.log(window.screen.height)
                        // console.log($(".rhombus" + i).offset().top);
                        // console.log($(".rhombus" + i).offset().left);
                        // var leftx=null;
                        // var topy=null;
                        /* if(i>=92){
                         leftx = parseInt($(".rhombus" -92+ i).offset().left) - parseInt(window.screen.width);
                         topy = parseInt($(".rhombus" -92+ i).offset().top) - parseInt(window.screen.height);

                         }else {
                         }*/
                        var leftx = parseInt($(".rhombus" + i).offset().left) - parseInt(window.screen.width);
                        var topy = parseInt($(".rhombus" + i).offset().top) - parseInt(window.screen.height)


                        // console.log(leftx);
                        // console.log(topy)
                        if (leftx > 0) {
                            $("html,body").animate({"scrollLeft": "320px", "scrollTop": topy + 240 + "px"}, 1000);
                            if (topy > 0) {
                                $("html,body").animate({"scrollLeft": "320px", "scrollTop": topy + 240 + "px"}, 1000);
                            }
                        }
                        if (leftx < 0) {
                            $("html,body").animate({"scrollLeft": "100px", "scrollTop": topy + 240 + "px"}, 1000);
                            if (topy > 0) {
                                $("html,body").animate({"scrollLeft": "100px", "scrollTop": topy + 240 + "px"}, 1000);
                            }
                        }
                        /*当掷骰子以后最终就是到这个位置的打印*/
                        console.log(step + " 终极步数");
                        console.log(i + " iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");


                        if (step == 2 || step == 16 || step == 29 || step == 54 || step == 70) {//陪你晒郑州
                            /*陪你晒郑州*/
                            $.ajax({
                                async: false,
                                url: "/wxcs/showZhengzhou",
                                type: "post",
                                data: {
                                    steps: step,
                                    userId: $('#userid').val()
                                },
                                success: function (data) {


                                },
                                error: function (data) {
                                    console.log("这是一个错误事件")
                                }
                            })

                        } else if (step == 5 || step == 36 || step == 64) {//文字寻宝
                            window.location.href = "/treasure";
                        } else if (step == 8 || step == 21 || step == 42 || step == 67) {//大转盘
                            window.location.href = "/big";
                        } else if (step == 10 || step == 73 || step == 82) {//找弟字
                            window.location.href = "/finddi";
                        } else if (step == 19 || step == 39 || step == 90) {//切了个瓜，目前换成小心头顶
                            window.location.href = "/fruits";
                        } else if (step == 15 || step == 31 || step == 48 || step == 87) {//听歌识曲
                            window.location.href = "/sound";
                        } else if (step == 33 || step == 59||step==78) {//楼盘案猜想
                            window.location.href = "/buguess";

                        }
                        /*else if(step==26){//小心头顶，没有这个
                         window.location.href="/carful";
                         }*/


                        clearInterval(time); //如果到达指定位置则停止
                        $("#dice_mask").remove(); //移除遮罩
                        setTimeout(function () {
                            //在这儿 i是走到对应的方格
                            switch (i) {
                                case 1:
                                    break;
                                case 2:
                                    break;
                                case 3:
                                    $(".trigalle-lmask").show();
                                    $(".trigalle-rmask").show();
                                    $(".card-alert").show();
                                    $(".card-alert .card-word").show();
                                    // $(".words-one img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-pei.jpg");
                                    break;
                                case 4:
                                    break;
                                case 5:
                                    break;
                                case 6:
                                    break;
                                case 7:
                                    break;
                                case 8:
                                    break;
                                case 9:
                                    break;
                                case 10:
                                    break;
                                case 11:
                                    break;
                                case 12:
                                    break;
                                case 13:
                                    break;
                                case 14:
                                    break;
                                case 15:
                                    break;
                                case 16:
                                    break;
                                case 17:
                                    $(".trigalle-lmask").show();
                                    $(".trigalle-rmask").show();
                                    $(".card-alert").show();
                                    $(".card-alert .card-word").show();
                                    $(".pei img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-ni.jpg");
                                    $(".card-alert .card-word").find("p").eq(1).css("color", "#319921");
                                    $(".card-alert .card-word").find("p").eq(2).css("color", "#319921");
                                    $(".card-alert .card-word .word").text("你");
                                    // $(".words-one img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-pei.jpg");
                                    // $(".words-two img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-ni.jpg");
                                    break;
                                case 18:
                                    break;
                                case 19:
                                    break;
                                case 20:
                                    break;
                                case 21:
                                    break;
                                case 22:
                                    break;
                                case 23:
                                    break;
                                case 24:
                                    break;
                                case 25:
                                    break;
                                case 26:
                                    break;
                                case 27:
                                    break;
                                case 28:
                                    break;
                                case 29:
                                    break;
                                case 30:
                                    $(".trigalle-lmask").show();
                                    $(".trigalle-rmask").show();
                                    $(".card-alert").show();
                                    $(".card-alert .card-word").show();
                                    $(".pei img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-shai.jpg");
                                    $(".card-alert .card-word").find("p").eq(1).css("color", "#ca51ff");
                                    $(".card-alert .card-word").find("p").eq(2).css("color", "#ca51ff");
                                    $(".card-alert .card-word .word").text("晒");
                                    // $(".words-one img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-pei.jpg");
                                    // $(".words-two img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-ni.jpg");
                                    // $(".words-three img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-shai.jpg");
                                    break;
                                case 31:
                                    break;
                                case 32:
                                    break;
                                case 33:
                                    break;
                                case 34:
                                    break;
                                case 35:
                                    break;
                                case 36:
                                    break;
                                case 37:
                                    break;
                                case 38:
                                    break;
                                case 39:
                                    break;
                                case 40:
                                    break;
                                case 41:
                                    break;
                                case 42:
                                    break;
                                case 43:
                                    break;
                                case 44:
                                    break;
                                case 45:
                                    break;
                                case 46:
                                    $(".trigalle-lmask").show();
                                    $(".trigalle-rmask").show();
                                    $(".card-alert").show();
                                    $(".card-alert .card-word").show();
                                    $(".pei img").attr("src", "/assets/img/g-thank.png");
                                    $(".card-alert .card-word").find("p").eq(0).text("哎呦，这次有点背哦");
                                    $(".card-alert .card-word").find("p").eq(1).text("点背不能赖社会，那你能赖谁？").css("color", "#f95860");
                                    $(".card-alert .card-word").find("p").eq(2).text("我就不信，再试一次，还会这么背！").css("color", "#f95860");
                                    $(".card-alert .card-word .word").text("谢谢");
                                    // $(".words-one img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-pei.jpg");
                                    // $(".words-two img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-ni.jpg");
                                    // $(".words-three img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-shai.jpg");
                                    break;
                                case 47:
                                    break;
                                case 48:
                                    break;
                                case 49:
                                    break;
                                case 50:
                                    break;
                                case 51:
                                    break;
                                case 52:
                                    break;
                                case 53:
                                    break;
                                case 54:
                                    break;
                                case 55:
                                    $(".trigalle-lmask").show();
                                    $(".trigalle-rmask").show();
                                    $(".card-alert").show();
                                    $(".card-alert .card-word").show();
                                    $(".pei img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/g-zheng.png");
                                    $(".card-alert .card-word").find("p").eq(1).css("color", "#008ec9");
                                    $(".card-alert .card-word").find("p").eq(2).css("color", "#008ec9");
                                    $(".card-alert .card-word .word").text("郑");
                                    // $(".words-one img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-pei.jpg");
                                    // $(".words-two img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-ni.jpg");
                                    // $(".words-three img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-shai.jpg");
                                    // $(".words-four img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-zheng.jpg");
                                    break;
                                case 56:
                                    break;
                                case 57:
                                    break;
                                case 58:
                                    break;
                                case 59:
                                    break;
                                case 60:
                                    break;
                                case 61:
                                    break;
                                case 62:
                                    break;
                                case 63:
                                    break;
                                case 64:
                                    break;
                                case 65:
                                    break;
                                case 66:
                                    break;
                                case 67:
                                    break;
                                case 68:
                                    break;
                                case 69:
                                    break;
                                case 70:
                                    break;
                                case 71:
                                    $(".trigalle-lmask").show();
                                    $(".trigalle-rmask").show();
                                    $(".card-alert").show();
                                    $(".card-alert .card-word").show();
                                    $(".pei img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/g-zhou.png");
                                    $(".card-alert .card-word").find("p").eq(1).css("color", "#fa994b");
                                    $(".card-alert .card-word").find("p").eq(2).css("color", "#fa994b");
                                    $(".card-alert .card-word .word").text("州");
                                    // $(".words-one img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-pei.jpg");
                                    // $(".words-two img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-ni.jpg");
                                    // $(".words-three img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-shai.jpg");
                                    // $(".words-four img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-zheng.jpg");
                                    // $(".words-five img").attr("src", "http://s10.realdtech.com/xws/house-richer/richer-home/img/s-zhou.jpg");
                                    // setTimeout(function () {
                                    //     $(".card-alert .card-word").hide();
                                    //     $(".add-dice1").show();
                                    // }, 2000)
                                    break;
                                case 72:
                                    break;
                                case 73:
                                    break;
                                case 74:
                                    break;
                                case 75:
                                    break;
                                case 76:
                                    break;
                                case 77:
                                    break;
                                case 78:
                                    break;
                                case 79:
                                    break;
                                case 80:
                                    break;
                                case 81:
                                    break;
                                case 82:
                                    break;
                                case 83:
                                    break;
                                case 84:
                                    break;
                                case 85:
                                    break;
                                case 86:
                                    break;
                                case 87:
                                    break;
                                case 88:
                                    break;
                                case 89:
                                    break;
                                case 91:
                                    break;
                                case 92:
                                    break;
                            }
                        }, 1000)
                    }
                    i++; //继续前进
                }, 500);
            }

        }
    };
});